<?php

define('ROOT_PATH', dirname(__DIR__) . '/');

require ROOT_PATH . 'fw/base/Autoload.php';
\fw\base\Autoload::register();

use \fw\db\DB;

$conf = array(
    'host'     => '127.0.0.1',
    'port'     => '3306',
    'dbname'   => 'test',
    'user'     => 'root',
    'pwd'      => 'toor',
    'charset'  => 'utf8',
    'is_debug' => false,
);
DB::conn($conf);

//$data = array(
//    'title'       => md5(time()),
//    'create_time' => time(),
//);
//$ret = $db->setTable('demo')->insert($data);

$ret = DB::table('demo')->select();
var_export($ret);
